
// let dateStr = '2023-03-12';
// let dateObj = new Date(dateStr);
// console.log(dateObj.getFullYear().toString())  //2023
// console.log((dateObj.getMonth()+1).toString())  //3
// console.log(dateObj.getDate().toString())  //12



// let isoDateStr = dateObj.toISOString()
// console.log(isoDateStr); // 1987-03-24T16:00:00.000Z

let date = '1987-03-24T16:00:00.000Z'
let newDate = new Date(date)
console.log(newDate.getFullYear().toString())  //1987
console.log(newDate.getMonth().toString()+1)  //1987
console.log(newDate.getDate().toString())  //1987